package io.renren.param;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.renren.entity.ApEntity;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class ApHeartBeatData {
    @JsonProperty(value = "ap_id")
    String apId;

    @JsonProperty(value = "listen_port")
    String listenPort;

    @JsonProperty(value = "online_begin_time")
    String onlineBeginTime;

    @JsonProperty(value = "ip")
    String ip;

    @JsonProperty(value = "channel")
    String channel;

    @JsonProperty(value = "version")
    String version;

    @JsonProperty(value = "work_mode")
    String workMode;

    @JsonProperty(value = "mac")
    String mac;

    @JsonProperty(value = "sequence")
    String sequence;

    @JsonProperty(value = "netmask")
    String netmask;

    @JsonProperty(value = "last_work_time")
    String lastWorkTime;

    @JsonProperty(value = "sn")
    String sn;

    @JsonProperty(value = "user")
    String user;

    @JsonProperty(value = "gateway")
    String gateway;

    @JsonProperty(value = "status")
    String status;

    @JsonProperty(value = "desc")
    String desc;

    @JsonProperty(value = "allow_bind_v1esl")
    String allowBindV1esl;

    public static ApEntity convertFor(ApHeartBeatData data) {
        ApEntity apEntity = new ApEntity();
        BeanUtils.copyProperties(data, apEntity);
        return apEntity;
    }
}
